unit DList;

interface
uses
  Contnrs;

type
  TDestructList = class(TObjectList)
  public
    procedure Clear; override;
    destructor Destroy; override;
  end;

implementation

{ TDestructList }

procedure TDestructList.Clear;
var
  i : Integer;
begin
  for i:=0 to Count-1 do TObject(Items[i]).Free;
  inherited;
end;

destructor TDestructList.Destroy;
begin
  Clear;
  inherited;
end;

end.
